
import React from "react";
import { Button } from 'antd';
import { useNavigate } from "react-router-dom";
import { loginSys } from "@/common/api"


const Login: React.FC = () => {
    const navigate = useNavigate();
    const clickHander = () => {

        loginSys({
            userName: "admin",
            password: "admin"
        }).then((res) => {
            navigate('/menu/menu1-1');
        })

        // navigate('/menu/menu1-1');
    }
    return <>
        <div>
            <Button type="primary" onClick={clickHander}>登录</Button>
        </div>
    </>
}


export default Login